//
//  ConsultViewController.m
//  AoJi
//
//  Created by Administrator on 15/1/20.
//  Copyright (c) 2015年 xuanheng. All rights reserved.
//

#import "ConsultViewController.h"

@interface ConsultViewController ()

@end

@implementation ConsultViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //自定义titleview
    UIView *titleview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 64)];
    [titleview setBackgroundColor:[UIColor colorWithRed:249.0f/255.0f green:249.0f/255.0f blue:249.0f/255.0f alpha:1.0f]];
    
    UILabel *titleLabel = [[UILabel alloc]init];
    titleLabel.frame=CGRectMake(110, 30, 100, 30);
    titleLabel.text=@"澳际教育";
    titleLabel.textAlignment=NSTextAlignmentCenter;
    [titleview addSubview:titleLabel];
    
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    backBtn.frame=CGRectMake(20, 20, 44, 44);
    backBtn.backgroundColor=[UIColor redColor];
    [backBtn addTarget:self action:@selector(backButton) forControlEvents:UIControlEventTouchUpInside];
    [titleview addSubview:backBtn];
    [self.view addSubview:titleview];
    
    //咨询加载webview
    UIWebView *consult = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height-64)];
    [consult loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://chat.looyu.com/chat/chat/p.do?c=48653&f=103224&g=61298"]]];
    [self.view addSubview:consult];
}

//返回
-(void)backButton
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
